import http from "@/utils/http";

// 分类页面数据
export const getCategroy = (id) => {
    return http({
        url: "/category",
        params: {
            id,
        },
    });
};

// 二级分类
export const getSubCategroy = (id) => {
    return http({
        url: "/category/sub/filter",
        params: {
            id,
        },
    });
};



// 二级分类商品
/**
 * @description: 获取导航数据
 * @data { 
     categoryId: 1005000 ,
     page: 1,
     pageSize: 20,
     sortField: 'publishTime' | 'orderNum' | 'evaluateNum'
   } 
 * @return {*}
 */
export const getSubCategoryGoodsAPI = (data) => {
    return http({
        url: "/category/goods/temporary",
        method: "POST",
        data,
    });
};
